<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>05流程控制</title>
</head>
<body>
<script>
  /*顺序结构*/
  console.log(1);
  console.log(2);
  console.log(3);
  console.log(4);
  /*分支结构*/
  if('3'<'10'){
    console.log('比较的是数值');
  }else {
    console.log('比较的是字符编码');
  }
  /*选择分支*/
  let gender=1;
  switch(gender){
    case 1:
      console.log('女士');break;
    case 2:
      console.log('男士');break;
    default:
      console.log('数据有误');
  }
  /*循环结构*/
  let arr = ['张三','李四','王五','赵六','钱七'];
for(let i = 0;i<arr.length;i++){
  console.log(arr[i])
}
for(let n of arr){
  console.log(n)
}
</script>
</body>
</html>